Class Venue


  • public class Venue
    extends java.lang.Object
    Version:
    234
    Author:
    TeM
    Stage:
    ES04
    Introduced in:
    ExerciseSheet02 (provided)
    Programming problem category:
    simple entity classes
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int capacity
      the capacity of this venue the capacity is the (non-negative) maximum number of attendees allowed for this venue.
      private java.lang.String name
      the name of this venue
    • Constructor Summary

      Constructors 
      Constructor Description
      Venue()
      creates a default venue a default venue has the name "unknown" (without quotes) and capacity 0.
      Venue​(Venue v)
      creates a copy of a venue
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCapacity()
      get the capacity of this venue
      java.lang.String getName()
      get the name of this venue
      void setCapacity​(int capacity)
      set the capacity of this venue the capacity must be a non-negative number.
      void setName​(java.lang.String name)
      set the name of this venue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        private java.lang.String name
        the name of this venue
      • capacity

        private int capacity
        the capacity of this venue the capacity is the (non-negative) maximum number of attendees allowed for this venue.
    • Constructor Detail

      • Venue

        public Venue()
        creates a default venue a default venue has the name "unknown" (without quotes) and capacity 0.
      • Venue

        public Venue​(Venue v)
        creates a copy of a venue
        Parameters:
        v - the original venue to copied
        Introduced in:
        ExerciseSheet03
        Programming problem aspect:
        copy constructor
    • Method Detail

      • getCapacity

        public int getCapacity()
        get the capacity of this venue
        Returns:
        the capacity
      • setCapacity

        public void setCapacity​(int capacity)
        set the capacity of this venue the capacity must be a non-negative number. all other values are ignored, the object remains unchanged.
        Parameters:
        capacity - to set
      • getName

        public java.lang.String getName()
        get the name of this venue
        Returns:
        the name
      • setName

        public void setName​(java.lang.String name)
        set the name of this venue
        Parameters:
        name - the name to set